#ifndef __SHAPE_H__
#define __SHAPE_H__

#include "Point.h"
#include<list>
using namespace std;
//class's decleration
class ScreenApp;
class screen;
class ShapeContainer;

class Shape
{
protected:
	Point m_point;
	double m_shiftX,m_shiftY,m_shiftXTmp,m_shiftYTmp;

public:
	//c'tor
	Shape(): m_shiftX(0), m_shiftY(0), m_shiftXTmp(0), m_shiftYTmp(0){};
	//copy c'tor
	Shape(Shape &other);

	//virtual functions
	virtual void draw( char sign = '*') = 0;
	virtual void drawWithHiding(char sign = '*') = 0;
	virtual bool isInShape(int x, int y) = 0;
	virtual void setShape() = 0;
	virtual Shape* copyShape(const Shape* other) = 0;
	virtual void drawToBuffer( screen &scr) = 0;
	virtual void calcShapeMove(ShapeContainer &work_cont, list<Shape*>::iterator itr, bool withTransfer) = 0;

	//point interactions
	void setPoint();
	int getX()const {return m_point.getX();}
	int getY()const {return m_point.getY();}
	void setX(int x){ m_point.setX(x);}
	void setY(int y){ m_point.setY(y);}
	void setShiftX(double x){ m_shiftX = x;}
	void setShiftY(double y){ m_shiftY = y;}
	void setShiftXTmp(double x){ m_shiftXTmp = x;}
	void setShiftYTmp(double y){ m_shiftYTmp = y;}
	double getShiftX()const{ return m_shiftX;}
	double getShiftY()const{ return m_shiftY;}
	double getShiftXTmp()const{ return m_shiftXTmp;}
	double getShiftYTmp()const{ return m_shiftYTmp;}
	void changeX(int move){ m_point.setX(m_point.getX() + move);} 
	void changeY(int move){ m_point.setY(m_point.getY() + move);} 
	void assignAnimationValues();
	void moveShape();
};



#endif